#pragma once
#include "DXAMLCommon.h"
#include "IObject.h"
#include "CValue.h"


class CXMLObject :
	public IObject
{
public: 
	CXMLObject();
	virtual ~CXMLObject();
	virtual XUINT32 AddRef();
	virtual XUINT32 Release();
	static HRESULT Create(XUINT32 cName, XCHAR * pName, XBOOL isAttribute, CValue & value);
	virtual void GetValue(XUINT32 cName, const XCHAR * pName, CValue & value);
	virtual HRESULT SetValue(CValue & value, XBOOL isAttribute);
	virtual void ClearValue(XUINT32 cName, const XCHAR * pName);
	virtual XBOOL IsName(XUINT32 cName, const XCHAR * pName);
	virtual XUINT32 GetPropertyCount() const;
	virtual CXMLObject * GetProperty(XUINT32 cName, const XCHAR * pName);
	virtual CXMLObject * GetPropertyAtIndex(XUINT32 nProperty);
protected: 
	XUINT32 m_cRef;
	XUINT32 m_cProperty;
	CXMLObject * * m_paProperty;
	CValue m_value;
public: 
	XUINT32 m_cName;
	XCHAR * m_pName;
	XINT32 m_id;
};


